package org.grew.openEntity.repository;

import org.grew.openEntity.po.logic.EditionObj;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @program: open_entity
 * @author: todd
 * @create: 2019-01-05 21:36
 * @description: 版本 数据仓库
 */
@Repository
public interface EditionRepository extends JpaRepository<EditionObj,Long> {

    @Query(value = "from EditionObj e where e.editionName like %:editionName%")
    List<EditionObj> findEditionObjByEditionName(@Param("editionName") String editionName);

    @Query(value = "from EditionObj e where e.editionName =:editionName")
    List<EditionObj> checkEdition(@Param("editionName") String editionName);
}
